{#include file="aj/pageheader.html"#}
<script>
       var editor;
			KindEditor.ready(function(K) {
				editor = K.create('textarea[id="content"]', {
					allowFileManager : true,
					pasteType : 2,
					newlineTag : this.value,
					filterMode : true,
					urlType : 'domain'
				});
			});
</script>
<h1>
<span class="action-span1"><a href="#">修改产品分类</a> </span>
<span class="action-span"><a href="{#spUrl c=goodscat a=index#}">产品分类</a></span>
</h1>
<div class="main-div">
<form method="post" action="{#spUrl c=goodscat a=update#}" name="theForm"  onsubmit="return validate()" enctype="multipart/form-data">
<table cellspacing="1" cellpadding="3" width="100%">
  <tr>
    <td class="label">产品分类名称</td>
    <td><input type="text" name="catename" maxlength="60" size = "30" value="{#$cat.catename#}"/>&nbsp;<font color="#FF0000">*</font></td>
  </tr>
  <tr>
    <td class="label">英文小名称</td>
    <td><input type="text" name="catename1" maxlength="60" size = "30" value="{#$cat.catename1#}"/>&nbsp;<font color="#FF0000">*</font></td>
  </tr>
  <tr style="display:none">
    <td class="label">产品名称</td>
    <td><input type="text" name="title" maxlength="60" size = "30" value="{#$cat.title#}"/>&nbsp;<font color="#FF0000">*</font></td>
  </tr>
  <tr>
    <td class="label">上级分类</td>
    <td>
      <select name="pid" >
        <option value="0">顶级分类</option>
        {#foreach item=cat_sel from=$cat_select#}
        	<option value="{#$cat_sel.id#}" {#if $cat_sel.id==$cat.pid#} selected="selected" {#/if#} style="padding-left:{#$cat_sel.level*20#}px">{#str_repeat('&nbsp;', $cat['level']*4)#}{#$cat_sel.catename#}</option>
        {#/foreach#}
      </select>
    </td>
  </tr>
  <tr style="display:none">
    <td class="label">价格:</td>
    <td>
      <input type="text" name='price' size="15"  value="{#$cat.price#}"/>
    </td>
  </tr>
  <tr>
    <td class="label">排序:</td>
    <td>
      <input type="text" name='sort_id' size="15"  value="{#$cat.sort_id#}"/>
    </td>
  </tr>
   <tr style="display:none">
    <td class="label">分类图片:</td>
    <td>
      <input type="file" name="upfile"/>
    </td>
  </tr>
  <tr style="display:none">
    <td class="label">图片显示:</td>
    <td>
      <img src="uploads/sm_goodscat/{#$cat.upfile#}" width="100"/>
    </td>
  </tr>
 <tr style="display:none">
        <td class="label">简介</td>
        <td><textarea id="short" name="short" cols="100" rows="8" >{#$cat.short#}</textarea></td>
  </tr>
  <tr style="display:none">
        <td class="label">文章内容</td>
        <td><textarea id="content" name="content" cols="100" rows="8" style="width:700px;height:300px;">{#$cat.content#}</textarea></td>
  </tr>
  
  <tr style="display:none">
    <td class="label" valign="middle">行业选择:</td>
    <td align="left">
      <ul class="typelabel">
      	{#foreach item="sgoods_color" from=$sgoodscolor#}
        	{#assign var="x" value="false"#} 
            
        	{#foreach item="sgoodsid" from=$cat.ttid#}
                {#if $sgoodsid==$sgoods_color.id#}
                    {#$x=true#}
                {#/if#}
             {#/foreach#}
                <li>
                	{#$sgoods_color.catename#}
                    <input type="checkbox" name="tid[]" value="{#$sgoods_color.id#}" {#if $x==1#} checked="checked" {#/if#}/>
                </li>
           
        {#/foreach#}
      </ul>
    </td>
  </tr>
<tr style="display:none">
    <td class="label" valign="middle">检测项目:</td>
    <td align="left">
      <ul class="typelabel">
      	{#foreach item=fgoods from=$fgoodscolor#}
        	{#assign var="x" value="false"#} 
            
        	{#foreach item="sgoodsid" from=$cat.ssid#}
                {#if $sgoodsid==$fgoods.id#}
                    {#$x=true#}
                {#/if#}
             {#/foreach#}
                <li>
                	{#$fgoods.catename#}
                    <input type="checkbox" name="sid[]" value="{#$fgoods.id#}" {#if $x==1#} checked="checked" {#/if#}/>
                </li>
           
        {#/foreach#}
      </ul>
    </td>
  </tr>   
  
<!--  <tr>
    <td class="label">分类关键词</td>
    <td><input type="text" name="content" size="80" value="{#$cat.content#}"/><br/><span><font color="#FF0000">格式为:sofa,dining,balcony 以逗号隔开</font></span>
    </td>
  </tr>-->
   <tr>
    <td class="label">SEO标题</td>
    <td><input type="text" name="seotitle" maxlength="60" size="50" value="{#$cat.seotitle#}"/><br/><span><font color="#999999">SEO标题为选填项，其目的在于方便外部搜索引擎搜索</font></span>
    </td>
  </tr>  
    
   <tr>
    <td class="label">关键字</td>
    <td><input type="text" name="keyword" maxlength="60" size="50" value="{#$cat.keyword#}"/><br/><span><font color="#999999">关键字为选填项，其目的在于方便外部搜索引擎搜索</font></span>
    </td>
  </tr>
  <tr>
    <td class="label">描述</td>
    <td><textarea  name="description" cols="60" rows="4">{#$cat.description#}</textarea></td>
  </tr> 
  <tr>
    <td colspan="2" align="center"><br />
      <input type="hidden" name="id" value="{#$cat.id#}" />
      <input type="submit" class="button" value="提交" />
      <input type="reset" class="button" value="重置" />
      
    </td>
  </tr>
</table>
</form>
</div>
{#include file="aj/pagefooter.html"#}